<template>
    <div>
        <!-- 轮播图 -->
        <swiper :lunbotu="lunbotu" :isfull="true"></swiper>
        <!-- 9宫格 -->
        <ul class="mui-table-view mui-grid-view mui-grid-9">
		     <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                 <!-- 下面就是路由链接 -->
                 <router-link to="/home/newList">
		             <span class="mui-icon mui-icon-home"></span>
		             <div class="mui-media-body">新闻资讯</div></router-link></li>
		     <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/home/photo">
		             <span class="mui-icon mui-icon-email"><span class="mui-badge">5</span></span>
		             <div class="mui-media-body">图片列表</div></router-link></li>
		     <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/home/goodlist">
		             <span class="mui-icon mui-icon-chatbubble"></span>
		             <div class="mui-media-body">商品列表</div></router-link></li>
		     <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-location"></span>
		                    <div class="mui-media-body">location</div></a></li>
		     <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		             <span class="mui-icon mui-icon-search"></span>
		             <div class="mui-media-body">Search</div></a></li>
		     <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		             <span class="mui-icon mui-icon-phone"></span>
		             <div class="mui-media-body">Phone</div></a></li>
		    </ul> 
    </div>
</template>
<script>
import {Toast} from 'mint-ui'
import swiper from './subcomponent/swiper.vue'
export default {
    data(){
        return {
          lunbotu:[]
        }
    },
    created(){
        this.getLunbotu();
    },
    methods:{
        //获取轮播图数据的方法
        getLunbotu(){
            this.$http.get("http://www.liulongbin.top:3005/api/getlunbo").then(result =>{
                // console.log(result.body)
                if(result.body.status===0){
                    //成功了
                    this.lunbotu=result.body.message;
                }else{
                    Toast('失败了')
                }
            })
        }
    },
    components:{
        swiper
    }
}
</script>
<style scoped lang="scss">

.mui-grid-view.mui-grid-9{
        background-color: white;
        border: 0px;
       .mui-grid-view.mui-grid-9 .mui-table-view-cell{
           border: 0px;
       }
    }
</style>